﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;
using System.Data;

namespace BLL
{
    public class B_Dichvu
    {
        public M_Dichvu GetByPK_DichvuID(int DichvuID)
        {
            return (new D_Dichvu()).GetbyPK_DichvuID(DichvuID);
        }

        public DataTable GetAll()
        {
            return (new D_Dichvu()).GetAll();
        }

        public void Insert(M_Dichvu M_Dichvu)
        {
            (new D_Dichvu()).Insert(M_Dichvu);
        }

        public void Update(M_Dichvu M_Dichvu)
        {
            (new D_Dichvu()).Update(M_Dichvu);
        }

        public void Delete(int DichvuID)
        {
            if (DichvuID <= 0)
                throw new Exception("Không hợp lệ! Vui lòng thử lại sau!");

            new D_Dichvu().Delete(DichvuID);
        }
    }
}
